<template>
    <Maptalks :mapOnLoadCB="mapOnLoadCB"></Maptalks>
</template>

<script>
import Maptalks from "@/components/common/Maptalks.component.vue"
import MapLayerConst from "@/const/MapLayerConst"

export default {
    name: "AddMarker.component",
    components: {Maptalks},
    setup() {

        let mapOnLoadCB = (map) => {

            let m1 = new maptalks.Marker([121.505, 31.2611]);
            let m2 = new maptalks.Marker([121.605, 31.2611]);
            let m3 = new maptalks.Marker([121.705, 31.2611]);
            let m4 = new maptalks.Marker([121.805, 31.2611]);

            new maptalks.VectorLayer(MapLayerConst.MAP_MARKER_LAYER).addGeometry(m1, m2, m3, m4).addTo(map);
        };

        return {
            mapOnLoadCB
        }
    }
}
</script>

<style scoped>

</style>